package edu.lab3.controller;

import edu.lab3.Utils.ResultVOUtil;
import edu.lab3.VO.ResultVO;
import edu.lab3.service.VirusDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Chb
 * date 2020-05-10
 */

@Controller
@ResponseBody
public class InfectionDataController {
    @Autowired
    VirusDataService virusDataService;

    @RequestMapping("/infectionCases/all")
    public ResultVO getInfectionData(){
        return ResultVOUtil.success(virusDataService.getRegionInfectionList());
    }

}
